package com.cqsd.entry.a.b.c;

import com.cqsd.ioc.annotation.Autowrite;
import com.cqsd.ioc.annotation.Component;
import com.cqsd.ioc.trait.use.FactoryBean;

/**
 * @author caseycheng
 * @date 2023/3/24-23:07
 **/
@Component
public class StuBuild implements FactoryBean {
    @Autowrite
    private EmpService service;
    /**
     * 获取工厂所构建的类型
     *
     * @return
     */
    @Override
    public Class<?> getType() {
        return StuService.class;
    }

    /**
     * 创建bean对象
     *
     * @return
     */
    @Override
    public Object create() {
        return new StuService(service);
    }
}
